# -*- python -*-
#:kivy 1.0

#:import guiCommon levin.guiCommon
#:import synchroGui levin.synchroGui

<SettingScreen>:
    boxLayout: _layout
    StackLayout:
        id: _layout
        #orientation: 'vertical'
        orientation: 'tb-lr'
        spacing: [3, 10]
        padding: [5, 5]
        
        LeVinButton:
            text: _("Back to main screen")
            on_press: guiCommon.switchScreen( 'mainScreen' )

        BoxLayout:
            orientation: 'horizontal'
            height: _innerB.height
            size_hint: (1,None)
            spacing: 10
            CustomSelectorStarter:
                id: _innerB
                size_hint_x: 0.3
                text: _('Advanced filters')
                on_press: self.startCustom()
            CompactLabel:
                text:_("Search wines & bottles with finer criterias")

        BoxLayout:
            orientation: 'horizontal'
            height: _syncrhoB.height
            size_hint: (1,None)
            spacing: 10
            LeVinButton:
                id: _syncrhoB
                text: _(" ")
                size_hint_x: 0.3
                icon_src: 'icons/synchro.png'
                on_press: synchroGui.start_synchro_choosing_file()
            CompactLabel:
                text:_("Synchronize LeVin information with an other device")

        ModeButtonBar:
            #padding: self.width*0.01
            #spacing: self.padding[0]
            height: _wineB.height
            size_hint: (1,None)
            LeVinToggleButton:
                id: _wineB
                state: 'down'
                text: _("Cellar")
                on_press: guiCommon.commonEvents.dispatch('on_cellar_mode',None); self.parent.button_pressed(self); guiCommon.switchScreen( 'mainScreen' )
            LeVinToggleButton:
                id: _tastingB
                text: _("Tastings")
                on_press: guiCommon.commonEvents.dispatch('on_tastinglist_mode',None); self.parent.button_pressed(self);guiCommon.switchScreen( 'mainScreen' )
            
            

        LeVinButton:
            text: _("Test")
            on_press: root.dump()

